
// 基于template/src/views/{{appModules}}/{{pages@DEEDITVIEW3}}/{{spinalCase page.codeName}}-hook.ts.hbs生成
import { QXEvent } from 'qx-util';
import {
	EditView3ActionType,
	EditView3Controller,
	IEditView3Ability,
	IEditView3ControllerParams,
	IParam,
	IViewEvent,
} from '@/core';
import {
	useEditView3Props,
	useEditView3Basic,
	useEditView3ControllerParams,
    useEditView3Action,
} from '@/hooks/view/use-edit3-view';
import { model } from "./ibiz-order-s-edit-view-3-model";

/**
 * 获取输入参数
 *
 * @export
 * @return {*}
 */
export function useProps() {
	return {
		...useEditView3Props()
	};
}

/**
 * 获取基础数据
 *
 * @export
 * @param {*} props
 * @return {*}
 */
export function useBasic(props: any) {
	return {
		...useEditView3Basic(model, props)
	};
}

/**
 * 获取行为
 *
 * @export
 */
export function useAction(controller: any) {
	return {
        ...useEditView3Action(controller)
    }
}

/**
 * 获取控制器
 *
 * @export
 * @param {IParam} props
 * @param {QXEvent<IViewEvent<EditView3ActionType, IEditView3Ability>>} evt
 * @return {*}
 */
export function useController(
	props: IParam,
	evt: QXEvent<IViewEvent<EditView3ActionType, IEditView3Ability>>
) {
	const params: IEditView3ControllerParams<
		EditView3ActionType,
		IEditView3Ability
	> = useEditView3ControllerParams(model, props, evt);
	return new EditView3Controller(params);
}